package com.itheima.service;

import com.itheima.dao.findAllMapper;
import com.itheima.pojo.Contact;
import com.itheima.utils.MybatisUtils;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author MaQing
 * @create 2022-05-10 08:05
 */
public class findAllService {
    public List<Contact> findAll() {
        SqlSession sqlSession = MybatisUtils.getSqlSession();
        findAllMapper mapper = sqlSession.getMapper(findAllMapper.class);
        List<Contact> list = mapper.findAll();
        return list;
    }
}
